<?php
$arguments['title'] = '分配权限';
$arguments['location'] = array(
    "首页",
    "用户管理",
    "分配权限",
);
$arguments['css']=array(
    PUBLIC_LIB.'fonts/hui_iconfont/iconfont.css',
    PUBLIC_LIB.'js/core/Ztree/zTreeStyle/zTreeStyle.css',
);
$arguments['js']=array(
    PUBLIC_LIB.'js/core/Tooltip/tooltip.js',
    PUBLIC_LIB.'js/core/Ztree/jquery-ztree-2.5.js',
    PUBLIC_LIB.'js/biz/ajaxfun.js',
    PUBLIC_LIB.'js/biz/distributauth.js',
);
importHeader($arguments);
?>
<div class="formtitle"><span>特殊赋权</span></div>
    <form  target="rightFrame" id="jsForm">
    <input type="hidden" id="adminId" value="<?php if(isset($adminId))echo $adminId;?>"
    />
        <ul class="forminfo">
            <li>
                <label for="name" class="label_input">用户名<font class="red">*</font></label>
                <input type="text" class="dfinput" id="name" name="name" disabled="disabled" value="<?php if(isset($adminName))echo $adminName;?>"/>
            </li>
            <li style="display:none;">
                <label for="department">部门名称</label>
                <div>
                <select class="dfselect" id="department">
                    <option value="-1">全部门权限</option>
                </select>
                </div>
            </li>
            <li>
                <div class="table_box tablelist">   
                <table width="100%">
                    <thead>
                        <tr>
                            <th>未拥有权限</th>
                            <th>操作</th>
                            <th>已拥有权限</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td width="40%" valign="top">
                                <div class="ztree_div">
                                    <ul id="srcTree" class="tree"></ul>
                                    
                                </div>
                                
                            </td>
                            <td width="20%" valign="middle" align="center">
                            <div class="changebox">
                                <span id="btnadd" class="change_btn" onClick="addRole()">选中右移 &gt;</span> 
                                <span id="bendel" class="change_btn" onClick="delRole()">&lt; 选中左移</span>
                            </div>
                            </td>
                            
                            <td width="40%" valign="top">
                                <div class="ztree_div">
                                    <ul id="tarTree" class="tree"></ul>
                                </div>
                            </td>
                        </tr>  
                    </tbody>
                </table>
                </div>
            </li>
        </ul>
    </form>
    <div class="special_list">
        <div class="spcial_div">
            <p>用户拥有特殊权限<span class="span_del" onclick = "deleteSpecial();"><i class="Hui-iconfont">&#xe609;</i></span></p>
            <table class="special_table" id="special_del">
                <thead>
                    <tr>
                        <th>权限名</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="specialFunction">
                    
                </tbody>
            </table>
        </div>
        <div class="spcial_div">
            <p>用户拒绝特殊权限<span class="span_del" onclick = "deleteRefush();" ><i class="Hui-iconfont">&#xe609;</i></span></p>
            <table class="special_table" id="special_add">
                <thead>
                    <tr>
                        <th>权限名</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="refushFunction">
                    
                </tbody>
            </table>
        </div>
        <input type="button" class="btn" value="提交" />
        <a href="/user/" class="btn_back">返回</a>
    </div>
<?php
    importFooter();
?>